<div class="container">
    <div dnd-list="$ctrl.data" dnd-inserted="$ctrl.updateOrders(index)">
        <div ng-repeat="item in $ctrl.data | orderBy: 'priority' track by $index" dnd-draggable="item" dnd-type="'item'"
            dnd-effect-allowed="copyMove" dnd-selected="$ctrl.selectedItem = item"
            dnd-dragstart="$ctrl.dragStart($index)" ng-class="{'selected': $ctrl.selectedItem === item}" class="row">
            <table class="table table-sm mb-0 border-top-0">
                <tbody>
                    <tr>
                        <th scope="row" width="20px" class="align-middle"><span class="fa fa-grip-vertical text-black-50"></span>
                        </th>
                        <td class="align-middle">
                            <div class="custom-control custom-switch">
                                <input type="checkbox" class="custom-control-input" id="customSwitch_{{item.id}}" ng-model="item.isActived" ng-change="$ctrl.save(item)">
                                <label class="custom-control-label" for="customSwitch_{{item.id}}" ng-bind="item.data.title"></label>
                            </div>
                            <!-- <input type="checkbox" ng-model="item.isActived" ng-change="$ctrl.save(item)"> -->
                        </td>
                        <!-- <td class="align-middle"><span ng-bind="item.data.title"></span></td> -->
                        <td class="align-middle" width="5%"><a
                                ng-click="$ctrl.goToPath('/portal/attribute-set/details/' + item.id)"
                                class="btn btn-link text-primary">
                                <span class="fas fa-pen"></span>
                            </a></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div ng-repeat="nav in $ctrl.data | orderBy: 'priority' track by $index" ng-if="nav.isActived" class="card mt-3">
    <h6 class="card-header">
        {{nav.data.title}} attribute's data
        <a class="btn-link text-primary btn-sm float-right py-0" ng-click="nav.show = !nav.show">
            <span class="far fa-minus-square text-primary"></span>
            Show/Hide</a>
    </h6>

    <div class="card-body" ng-show="nav.show">
        <attribute-set-nav-data nav="nav" parent-id="$ctrl.parentId" parent-type="$ctrl.parentType">
        </attribute-set-nav-data>
    </div>
</div>
<!-- <tabs-v class="mb-3" ng-if="$ctrl.parentId">
    <pane-v header="{{nav.data.title}}" id="pane-container-{{nav.data.id}}" class="card"
        ng-repeat="nav in $ctrl.data | orderBy: 'priority' track by $index" ng-if="nav.isActived">
        <div class="card-body">
            <attribute-set-nav-data nav="nav" parent-id="$ctrl.parentId" parent-type="$ctrl.parentType"></attribute-set-nav-data>
        </div>
    </pane-v>
</tabs-v> -->